<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="common.css " />
    <style>
      .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #f00;
        overflow-y: auto;
      }
      .menu-overlay li {
        list-style: none;
      }
      .menu-overlay a {
        position: relative;
        text-decoration: none;
        color: #fff;
        font-size: 3.5em;
        font-weight: 700;
      }
      .menu-overlay a:before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 8px;
        background: #fff;
        transform: translateY(-50%) scaleX(0);
        transform-origin: right;
        transition: 0.5s transform;
      }
      .menu-overlay a:hover:before {
        transform: translateY(-10%) scaleX(1);
        transform-origin: left;
        transition: 0.5s transform;
      }
      .menu-overlay.active {
        transform: scale(1);
      }
      button {
        z-index: 99;
        position: absolute;
        right: 0;
        top: 0;
        background: yellow;
        padding: 5px;
        border: none;
      }
    </style>
  </head>
  <body>
    <button onclick="toggleActive()">toggle</button>
    <ul class="menu-overlay flex-col-center">
      <li><a href="#">about</a></li>
      <li><a href="#">user</a></li>
      <li><a href="#">info</a></li>
      <li><a href="#">oper</a></li>
      <li><a href="#">other</a></li>
    </ul>
  </body>
  <script type="text/javascript">
    function toggleActive() {
      let menuOverlay = document.querySelector(".menu-overlay");
      menuOverlay.classList.toggle("active");
    }
  </script>
</html>
